syntax = "proto3"; import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; package Hexagon.MTM.V1; service MTMService { rpc GetMachineStatus(google.protobuf.Empty) returns (stream GetMachineStatusResponse); //Server response stream rpc GetProgramStatus(google.protobuf.Empty) returns (stream GetProgramStatusResponse); //Server response stream rpc UploadFile(stream UploadFileRequest) returns (UploadFileResponse); //Client request stream rpc GetJournals(stream GetJournalsRequest) returns (stream GetJournalsResponse); //Both ways stream rpc GetDFQFiles(stream GetDFQFilesRequest) returns (stream GetDFQFilesResponse); //Both ways stream rpc GetReportFileList(google.protobuf.Empty) returns (GetReportFileListResponse); rpc DownloadReportFile(DownloadReportFileRequest) returns (stream DownloadReportFileResponse); //Server response stream rpc RequestInteractive(InteractiveRequest) returns (InteractiveResponse); rpc GetInteractiveResult(InteractiveResultRequest) returns (InteractiveResultResponse); rpc GetPRGPreviews(stream PRGPreviewsRequest) returns (stream PRGPreviewsResopnse); //Both ways stream rpc GetMachineConfiguration(google.protobuf.Empty) returns (GetMachineConfigurationResponse); rpc GetCalibrationResult(google.protobuf.Empty) returns (GetCalibrationResultResponse); rpc ReadCurrentPosition(google.protobuf.Empty) returns (ReadCurrentPositionResponse); // For Siemens Collect rpc GetLogFiles(google.protobuf.Empty) returns (stream GetLogFilesResponse); } enum MachineStatus { machine_offline = 0; machine_idle = 1; machine_running = 2; machine_alarm = 3; } enum ProgramStatus { prog_none = 0; prog_executing = 1; prog_exec_success = 2; prog_exec_error = 3; } enum UploadFileTypes { cnc_macro = 0; cnc_measurement_routine = 1; pcd_report = 2; } enum InteractiveTypes { update_workoffset = 0; update_tooloffset = 1; write_var = 2; read_var = 3; } enum ImageTypes { png = 0; jpeg = 1; bmp = 2; } enum KinematicsTypes { Linear = 0; RotaryTable = 1; Wrist = 2; } message GetMachineStatusResponse { MachineStatus State = 1; string AlarmInfo = 2; string ProgramNumber = 3; } message GetProgramStatusResponse { ProgramStatus State = 1; bool IsDCM = 2; string ProgramName = 3; string ExecErrInfo = 4; } message UploadFileRequest { bytes FileData = 1; string FileName = 2; bool FileEOF = 3; bool NeedUploadMacro = 4; UploadFileTypes FileType = 5; string ControlPath = 6; bool TransferredToNCProgram = 7; } message UploadFileResponse { bool IsSuccess = 1; string ErrInfo = 2; } message GetJournalsRequest { int64 FileId = 1; bool FileOK = 2; } message GetJournalsResponse { int64 FileId = 1; string FileName = 2; bytes FileData = 3; bool FileEOF = 4; } message GetDFQFilesRequest { int64 FileId = 1; bool FileOK = 2; } message GetDFQFilesResponse { int64 FileId = 1; string FileName = 2; bytes FileData = 3; bool FileEOF = 4; } message ReportFileEntity { string FileName = 1; int64 FileSize = 2; google.protobuf.Timestamp LastWriteTimeUTC = 3; } message GetReportFileListResponse { repeated ReportFileEntity ReportFileList = 1; } message DownloadReportFileRequest { string FileName = 1; } message DownloadReportFileResponse { bytes FileData = 1; bool FileEOF = 2; string NexusJson = 3; } message InteractiveRequest { InteractiveTypes ReqType = 1; string ReqName = 2; bytes ReqData = 3; } message InteractiveResponse { bool IsSuccess = 1; string ErrInfo = 2; } message InteractiveResultRequest { InteractiveTypes ReqType = 1; string ReqName = 2; bool NeedSave = 3; } message InteractiveResultResponse { bool IsSuccess = 1; string ErrInfo = 2; double ValueOfReadVar = 3; } message PRGPreviewsRequest { string PrgFileName = 1; ImageTypes ImageType = 2; bytes ImageData = 3; bool ImageDataEOF = 4; } message PRGPreviewsResopnse { string PrgFileName = 1; ImageTypes ImageType = 2; } message GetMachineConfigurationResponse { bool IsSuccess = 1; string ErrInfo = 2; string FileContent = 3; } message CalibratedAxis { string AxisName = 1; KinematicsTypes KinematicsType = 2; double X = 3; double Y = 4; double Z = 5; double I = 6; double J = 7; double K = 8; } message GetCalibrationResultResponse { bool IsSuccess = 1; string ErrInfo = 2; string FileContent = 3; repeated CalibratedAxis CalibratedRotaryAxes = 4; } message AxisPosition { string AxisID = 1; string AxisName = 2; double Position = 3; } message ReadCurrentPositionResponse { bool IsSuccess = 1; string ErrInfo = 2; repeated AxisPosition Positions = 3; } // For Siemens Collect message GetLogFilesResponse { int64 FileId = 1; string FileName = 2; bytes FileData = 3; bool FileEOF = 4; }